package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.emergency.mapper.EmergencyExampleMapper;
import com.ruoyi.emergency.domain.EmergencyExample;
import com.ruoyi.emergency.service.IEmergencyExampleService;

/**
 * 经典案例Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-26
 */
@Service
public class EmergencyExampleServiceImpl extends ServiceImpl<EmergencyExampleMapper, EmergencyExample> implements IEmergencyExampleService //修改
{
    @Autowired
    private EmergencyExampleMapper emergencyExampleMapper;

    /**
     * 查询经典案例
     * 
     * @param id 经典案例主键
     * @return 经典案例
     */
    @Override
    public EmergencyExample selectEmergencyExampleById(Long id)
    {
        return emergencyExampleMapper.selectEmergencyExampleById(id);
    }

    /**
     * 查询经典案例列表
     * 
     * @param emergencyExample 经典案例
     * @return 经典案例
     */
    @Override
    public List<EmergencyExample> selectEmergencyExampleList(EmergencyExample emergencyExample)
    {
        return emergencyExampleMapper.selectEmergencyExampleList(emergencyExample);
    }

    /**
     * 新增经典案例
     * 
     * @param emergencyExample 经典案例
     * @return 结果
     */
    @Override
    public int insertEmergencyExample(EmergencyExample emergencyExample)
    {

        return emergencyExampleMapper.insertEmergencyExample(emergencyExample);
    }

    /**
     * 修改经典案例
     * 
     * @param emergencyExample 经典案例
     * @return 结果
     */
    @Override
    public int updateEmergencyExample(EmergencyExample emergencyExample)
    {
        return emergencyExampleMapper.updateEmergencyExample(emergencyExample);
    }

    /**
     * 批量删除经典案例
     * 
     * @param ids 需要删除的经典案例主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyExampleByIds(Long[] ids)
    {
        return emergencyExampleMapper.deleteEmergencyExampleByIds(ids);
    }

    /**
     * 删除经典案例信息
     * 
     * @param id 经典案例主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyExampleById(Long id)
    {
        return emergencyExampleMapper.deleteEmergencyExampleById(id);
    }
}
